<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>五彩导航栏</title>
    <style>
        .nav a {
            /* 取消下划线 */
            text-decoration: none;
            /* 转换为行内块元素 */
            display: inline-block;
            width: 120px;
            height: 58px;
            background-color: pink;
            text-align: center;
            line-height: 48px;
            color: white;
            text-decoration: none;
        }

        .nav .nav1 {
            background-image: url('images/bg1.png');
        }

        .nav .nav2 {
            background-image: url('images/bg2.png');
        }

        .nav .nav3 {
            background-image: url('images/bg3.png');
        }

        .nav .nav4 {
            background-image: url('images/bg4.png');
        }

        .nav .nav5 {
            background-image: url('images/bg5.png');
        }

        .nav .nav1:hover {
            background-image: url(images/bg11.png);

        }

        .nav .nav2:hover {
            background-image: url(images/bg22.png);

        }
    </style>
</head>
<div class="nav">
    <a href="#" class="nav1">五彩导航</a>
    <a href="#" class="nav2">五彩导航</a>
    <a href="#" class="nav3">五彩导航</a>
    <a href="#" class="nav4">五彩导航</a>
    <a href="#" class="nav5">五彩导航</a>

    <body>

    </body>

</html>